#include <bits/stdc++.h>
using namespace std;
const int INF=0x3f3f3f3f;
int x,y;
int main(void){
    int Max_x=0;
    int Max_y=0;
    int Min_x=INF;
    int Min_y=INF;
    while(~scanf("%d%d",&x,&y),x||y){
        Max_x=x;
        Min_x=x;
        Max_y=y;
        Min_y=y;
        while(~scanf("%d%d",&x,&y),x||y){
            Max_x=max(Max_x,x);
            Min_x=min(Min_x,x);
            Max_y=max(Max_y,y);
            Min_y=min(Min_y,y);
        }
        printf("%d %d %d %d\n",Min_x,Min_y,Max_x,Max_y);
    }
    return 0;
}